<template>
  <el-date-picker v-model="value" type="datetimerange" range-separator="到" start-placeholder="考试开始时间"
    end-placeholder="考试结束时间" value-format="YYYY-MM-DD hh:mm:ss"/>
<button @click="fun">click</button>
</template>

<script setup>
import { ref } from 'vue';

const value = ref()
const fun=()=>{
  console.log(value.value[0])
  console.log(value.value[1])
}

</script>

<style></style>